<?php
/*
	$dsfm_nav = array();

	$lv['link'] = URL."admin/".$dsfm_module;
	$lv['title'] = $dsfm_module;

	array_push($dsfm_nav, $lv);

	if($dsfm_action != ""){

		$lv['link'] = URL."admin/".$dsfm_module."/".$dsfm_action;
		$lv['title'] = str_replace(".php","",$dsfm_action);

		array_push($dsfm_nav, $lv);
	}

	$tpl->assign("dsfm_nav", $dsfm_nav);
*/

    $main_module = $admin->get_all_module();
    $sub_module = $admin->get_all_submodule();

    $tpl->assign("main_module", $main_module);
	$tpl->assign("sub_module", $sub_module);
	$tpl->assign("url", URL);

	$tpl->assign("dsfm_module", $dsfm_module);
	$tpl->assign("dsfm_action", $dsfm_action);

	$title = $admin->get_title($dsfm_module, $dsfm_action);

    $tpl->assign("title", $title);

	$tpl->draw("header");
    $tpl->draw("navigator");

    $path = $admin->get_path($dsfm_module, $dsfm_action);

    if($path){
        require_once($path);
    }else{
		$tpl->draw("home");
	}

    $tpl->draw("footer");
?>